//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2021 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto/tree/main/CodeGenerator. DO NOT EDIT.

import Foundation
import SotoCore

extension TranscribeService {
    // MARK: Enums

    public enum BaseModelName: String, CustomStringConvertible, Codable {
        case narrowband = "NarrowBand"
        case wideband = "WideBand"
        public var description: String { return self.rawValue }
    }

    public enum CLMLanguageCode: String, CustomStringConvertible, Codable {
        case enUs = "en-US"
        public var description: String { return self.rawValue }
    }

    public enum LanguageCode: String, CustomStringConvertible, Codable {
        case afZa = "af-ZA"
        case arAe = "ar-AE"
        case arSa = "ar-SA"
        case cyGb = "cy-GB"
        case daDk = "da-DK"
        case deCh = "de-CH"
        case deDe = "de-DE"
        case enAb = "en-AB"
        case enAu = "en-AU"
        case enGb = "en-GB"
        case enIe = "en-IE"
        case enIn = "en-IN"
        case enUs = "en-US"
        case enWl = "en-WL"
        case esEs = "es-ES"
        case esUs = "es-US"
        case faIr = "fa-IR"
        case frCa = "fr-CA"
        case frFr = "fr-FR"
        case gaIe = "ga-IE"
        case gdGb = "gd-GB"
        case heIl = "he-IL"
        case hiIn = "hi-IN"
        case idId = "id-ID"
        case itIt = "it-IT"
        case jaJp = "ja-JP"
        case koKr = "ko-KR"
        case msMy = "ms-MY"
        case nlNl = "nl-NL"
        case ptBr = "pt-BR"
        case ptPt = "pt-PT"
        case ruRu = "ru-RU"
        case taIn = "ta-IN"
        case teIn = "te-IN"
        case trTr = "tr-TR"
        case zhCn = "zh-CN"
        public var description: String { return self.rawValue }
    }

    public enum MediaFormat: String, CustomStringConvertible, Codable {
        case amr
        case flac
        case mp3
        case mp4
        case ogg
        case wav
        case webm
        public var description: String { return self.rawValue }
    }

    public enum ModelStatus: String, CustomStringConvertible, Codable {
        case completed = "COMPLETED"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        public var description: String { return self.rawValue }
    }

    public enum OutputLocationType: String, CustomStringConvertible, Codable {
        case customerBucket = "CUSTOMER_BUCKET"
        case serviceBucket = "SERVICE_BUCKET"
        public var description: String { return self.rawValue }
    }

    public enum RedactionOutput: String, CustomStringConvertible, Codable {
        case redacted
        case redactedAndUnredacted = "redacted_and_unredacted"
        public var description: String { return self.rawValue }
    }

    public enum RedactionType: String, CustomStringConvertible, Codable {
        case pii = "PII"
        public var description: String { return self.rawValue }
    }

    public enum Specialty: String, CustomStringConvertible, Codable {
        case primarycare = "PRIMARYCARE"
        public var description: String { return self.rawValue }
    }

    public enum TranscriptionJobStatus: String, CustomStringConvertible, Codable {
        case completed = "COMPLETED"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case queued = "QUEUED"
        public var description: String { return self.rawValue }
    }

    public enum `Type`: String, CustomStringConvertible, Codable {
        case conversation = "CONVERSATION"
        case dictation = "DICTATION"
        public var description: String { return self.rawValue }
    }

    public enum VocabularyFilterMethod: String, CustomStringConvertible, Codable {
        case mask
        case remove
        public var description: String { return self.rawValue }
    }

    public enum VocabularyState: String, CustomStringConvertible, Codable {
        case failed = "FAILED"
        case pending = "PENDING"
        case ready = "READY"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct ContentRedaction: AWSEncodableShape & AWSDecodableShape {
        /// The output transcript file stored in either the default S3 bucket or in a bucket you specify. When you choose redacted Amazon Transcribe outputs only the redacted transcript. When you choose redacted_and_unredacted Amazon Transcribe outputs both the redacted and unredacted transcripts.
        public let redactionOutput: RedactionOutput
        /// Request parameter that defines the entities to be redacted. The only accepted value is PII.
        public let redactionType: RedactionType

        public init(redactionOutput: RedactionOutput, redactionType: RedactionType) {
            self.redactionOutput = redactionOutput
            self.redactionType = redactionType
        }

        private enum CodingKeys: String, CodingKey {
            case redactionOutput = "RedactionOutput"
            case redactionType = "RedactionType"
        }
    }

    public struct CreateLanguageModelRequest: AWSEncodableShape {
        /// The Amazon Transcribe standard language model, or base model used to create your custom language model. If you want to use your custom language model to transcribe audio with a sample rate of 16 kHz or greater, choose Wideband. If you want to use your custom language model to transcribe audio with a sample rate that is less than 16 kHz, choose Narrowband.
        public let baseModelName: BaseModelName
        /// Contains the data access role and the Amazon S3 prefixes to read the required input files to create a custom language model.
        public let inputDataConfig: InputDataConfig
        /// The language of the input text you're using to train your custom language model.
        public let languageCode: CLMLanguageCode
        /// The name you choose for your custom language model when you create it.
        public let modelName: String

        public init(baseModelName: BaseModelName, inputDataConfig: InputDataConfig, languageCode: CLMLanguageCode, modelName: String) {
            self.baseModelName = baseModelName
            self.inputDataConfig = inputDataConfig
            self.languageCode = languageCode
            self.modelName = modelName
        }

        public func validate(name: String) throws {
            try self.inputDataConfig.validate(name: "\(name).inputDataConfig")
            try self.validate(self.modelName, name: "modelName", parent: name, max: 200)
            try self.validate(self.modelName, name: "modelName", parent: name, min: 1)
            try self.validate(self.modelName, name: "modelName", parent: name, pattern: "^[0-9a-zA-Z._-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case baseModelName = "BaseModelName"
            case inputDataConfig = "InputDataConfig"
            case languageCode = "LanguageCode"
            case modelName = "ModelName"
        }
    }

    public struct CreateLanguageModelResponse: AWSDecodableShape {
        /// The Amazon Transcribe standard language model, or base model you've used to create a custom language model.
        public let baseModelName: BaseModelName?
        /// The data access role and Amazon S3 prefixes you've chosen to create your custom language model.
        public let inputDataConfig: InputDataConfig?
        /// The language code of the text you've used to create a custom language model.
        public let languageCode: CLMLanguageCode?
        /// The name you've chosen for your custom language model.
        public let modelName: String?
        /// The status of the custom language model. When the status is COMPLETED the model is ready to use.
        public let modelStatus: ModelStatus?

        public init(baseModelName: BaseModelName? = nil, inputDataConfig: InputDataConfig? = nil, languageCode: CLMLanguageCode? = nil, modelName: String? = nil, modelStatus: ModelStatus? = nil) {
            self.baseModelName = baseModelName
            self.inputDataConfig = inputDataConfig
            self.languageCode = languageCode
            self.modelName = modelName
            self.modelStatus = modelStatus
        }

        private enum CodingKeys: String, CodingKey {
            case baseModelName = "BaseModelName"
            case inputDataConfig = "InputDataConfig"
            case languageCode = "LanguageCode"
            case modelName = "ModelName"
            case modelStatus = "ModelStatus"
        }
    }

    public struct CreateMedicalVocabularyRequest: AWSEncodableShape {
        /// The language code for the language used for the entries in your custom vocabulary. The language code of your custom vocabulary must match the language code of your transcription job. US English (en-US) is the only language code available for Amazon Transcribe Medical.
        public let languageCode: LanguageCode
        /// The location in Amazon S3 of the text file you use to define your custom vocabulary. The URI must be in the same AWS Region as the resource that you're calling. Enter information about your VocabularyFileUri in the following format:   https://s3.&lt;aws-region&gt;.amazonaws.com/&lt;bucket-name&gt;/&lt;keyprefix&gt;/&lt;objectkey&gt;   The following is an example URI for a vocabulary file that is stored in Amazon S3:  https://s3.us-east-1.amazonaws.com/AWSDOC-EXAMPLE-BUCKET/vocab.txt  For more information about Amazon S3 object names, see Object Keys in the Amazon S3 Developer Guide. For more information about custom vocabularies, see Medical Custom Vocabularies.
        public let vocabularyFileUri: String
        /// The name of the custom vocabulary. This case-sensitive name must be unique within an AWS account. If you try to create a vocabulary with the same name as a previous vocabulary, you get a ConflictException error.
        public let vocabularyName: String

        public init(languageCode: LanguageCode, vocabularyFileUri: String, vocabularyName: String) {
            self.languageCode = languageCode
            self.vocabularyFileUri = vocabularyFileUri
            self.vocabularyName = vocabularyName
        }

        public func validate(name: String) throws {
            try self.validate(self.vocabularyFileUri, name: "vocabularyFileUri", parent: name, max: 2000)
            try self.validate(self.vocabularyFileUri, name: "vocabularyFileUri", parent: name, min: 1)
            try self.validate(self.vocabularyFileUri, name: "vocabularyFileUri", parent: name, pattern: "(s3://|http(s*)://).+")
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, max: 200)
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, min: 1)
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, pattern: "^[0-9a-zA-Z._-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case vocabularyFileUri = "VocabularyFileUri"
            case vocabularyName = "VocabularyName"
        }
    }

    public struct CreateMedicalVocabularyResponse: AWSDecodableShape {
        /// If the VocabularyState field is FAILED, this field contains information about why the job failed.
        public let failureReason: String?
        /// The language code for the entries in your custom vocabulary. US English (en-US) is the only valid language code for Amazon Transcribe Medical.
        public let languageCode: LanguageCode?
        /// The date and time that you created the vocabulary.
        public let lastModifiedTime: Date?
        /// The name of the vocabulary. The name must be unique within an AWS account and is case sensitive.
        public let vocabularyName: String?
        /// The processing state of your custom vocabulary in Amazon Transcribe Medical. If the state is READY, you can use the vocabulary in a StartMedicalTranscriptionJob request.
        public let vocabularyState: VocabularyState?

        public init(failureReason: String? = nil, languageCode: LanguageCode? = nil, lastModifiedTime: Date? = nil, vocabularyName: String? = nil, vocabularyState: VocabularyState? = nil) {
            self.failureReason = failureReason
            self.languageCode = languageCode
            self.lastModifiedTime = lastModifiedTime
            self.vocabularyName = vocabularyName
            self.vocabularyState = vocabularyState
        }

        private enum CodingKeys: String, CodingKey {
            case failureReason = "FailureReason"
            case languageCode = "LanguageCode"
            case lastModifiedTime = "LastModifiedTime"
            case vocabularyName = "VocabularyName"
            case vocabularyState = "VocabularyState"
        }
    }

    public struct CreateVocabularyFilterRequest: AWSEncodableShape {
        /// The language code of the words in the vocabulary filter. All words in the filter must be in the same language. The vocabulary filter can only be used with transcription jobs in the specified language.
        public let languageCode: LanguageCode
        /// The Amazon S3 location of a text file used as input to create the vocabulary filter. Only use characters from the character set defined for custom vocabularies. For a list of character sets, see Character Sets for Custom Vocabularies. The specified file must be less than 50 KB of UTF-8 characters. If you provide the location of a list of words in the VocabularyFilterFileUri parameter, you can't use the Words parameter.
        public let vocabularyFilterFileUri: String?
        /// The vocabulary filter name. The name must be unique within the account that contains it. If you try to create a vocabulary filter with the same name as another vocabulary filter, you get a ConflictException error.
        public let vocabularyFilterName: String
        /// The words to use in the vocabulary filter. Only use characters from the character set defined for custom vocabularies. For a list of character sets, see Character Sets for Custom Vocabularies. If you provide a list of words in the Words parameter, you can't use the VocabularyFilterFileUri parameter.
        public let words: [String]?

        public init(languageCode: LanguageCode, vocabularyFilterFileUri: String? = nil, vocabularyFilterName: String, words: [String]? = nil) {
            self.languageCode = languageCode
            self.vocabularyFilterFileUri = vocabularyFilterFileUri
            self.vocabularyFilterName = vocabularyFilterName
            self.words = words
        }

        public func validate(name: String) throws {
            try self.validate(self.vocabularyFilterFileUri, name: "vocabularyFilterFileUri", parent: name, max: 2000)
            try self.validate(self.vocabularyFilterFileUri, name: "vocabularyFilterFileUri", parent: name, min: 1)
            try self.validate(self.vocabularyFilterFileUri, name: "vocabularyFilterFileUri", parent: name, pattern: "(s3://|http(s*)://).+")
            try self.validate(self.vocabularyFilterName, name: "vocabularyFilterName", parent: name, max: 200)
            try self.validate(self.vocabularyFilterName, name: "vocabularyFilterName", parent: name, min: 1)
            try self.validate(self.vocabularyFilterName, name: "vocabularyFilterName", parent: name, pattern: "^[0-9a-zA-Z._-]+")
            try self.words?.forEach {
                try validate($0, name: "words[]", parent: name, max: 256)
                try validate($0, name: "words[]", parent: name, min: 1)
            }
            try self.validate(self.words, name: "words", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case vocabularyFilterFileUri = "VocabularyFilterFileUri"
            case vocabularyFilterName = "VocabularyFilterName"
            case words = "Words"
        }
    }

    public struct CreateVocabularyFilterResponse: AWSDecodableShape {
        /// The language code of the words in the collection.
        public let languageCode: LanguageCode?
        /// The date and time that the vocabulary filter was modified.
        public let lastModifiedTime: Date?
        /// The name of the vocabulary filter.
        public let vocabularyFilterName: String?

        public init(languageCode: LanguageCode? = nil, lastModifiedTime: Date? = nil, vocabularyFilterName: String? = nil) {
            self.languageCode = languageCode
            self.lastModifiedTime = lastModifiedTime
            self.vocabularyFilterName = vocabularyFilterName
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case lastModifiedTime = "LastModifiedTime"
            case vocabularyFilterName = "VocabularyFilterName"
        }
    }

    public struct CreateVocabularyRequest: AWSEncodableShape {
        /// The language code of the vocabulary entries.
        public let languageCode: LanguageCode
        /// An array of strings that contains the vocabulary entries.
        public let phrases: [String]?
        /// The S3 location of the text file that contains the definition of the custom vocabulary. The URI must be in the same region as the API endpoint that you are calling. The general form is  For more information about S3 object names, see Object Keys in the Amazon S3 Developer Guide. For more information about custom vocabularies, see Custom Vocabularies.
        public let vocabularyFileUri: String?
        /// The name of the vocabulary. The name must be unique within an AWS account. The name is case sensitive. If you try to create a vocabulary with the same name as a previous vocabulary you will receive a ConflictException error.
        public let vocabularyName: String

        public init(languageCode: LanguageCode, phrases: [String]? = nil, vocabularyFileUri: String? = nil, vocabularyName: String) {
            self.languageCode = languageCode
            self.phrases = phrases
            self.vocabularyFileUri = vocabularyFileUri
            self.vocabularyName = vocabularyName
        }

        public func validate(name: String) throws {
            try self.phrases?.forEach {
                try validate($0, name: "phrases[]", parent: name, max: 256)
                try validate($0, name: "phrases[]", parent: name, min: 0)
                try validate($0, name: "phrases[]", parent: name, pattern: ".+")
            }
            try self.validate(self.vocabularyFileUri, name: "vocabularyFileUri", parent: name, max: 2000)
            try self.validate(self.vocabularyFileUri, name: "vocabularyFileUri", parent: name, min: 1)
            try self.validate(self.vocabularyFileUri, name: "vocabularyFileUri", parent: name, pattern: "(s3://|http(s*)://).+")
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, max: 200)
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, min: 1)
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, pattern: "^[0-9a-zA-Z._-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case phrases = "Phrases"
            case vocabularyFileUri = "VocabularyFileUri"
            case vocabularyName = "VocabularyName"
        }
    }

    public struct CreateVocabularyResponse: AWSDecodableShape {
        /// If the VocabularyState field is FAILED, this field contains information about why the job failed.
        public let failureReason: String?
        /// The language code of the vocabulary entries.
        public let languageCode: LanguageCode?
        /// The date and time that the vocabulary was created.
        public let lastModifiedTime: Date?
        /// The name of the vocabulary.
        public let vocabularyName: String?
        /// The processing state of the vocabulary. When the VocabularyState field contains READY the vocabulary is ready to be used in a StartTranscriptionJob request.
        public let vocabularyState: VocabularyState?

        public init(failureReason: String? = nil, languageCode: LanguageCode? = nil, lastModifiedTime: Date? = nil, vocabularyName: String? = nil, vocabularyState: VocabularyState? = nil) {
            self.failureReason = failureReason
            self.languageCode = languageCode
            self.lastModifiedTime = lastModifiedTime
            self.vocabularyName = vocabularyName
            self.vocabularyState = vocabularyState
        }

        private enum CodingKeys: String, CodingKey {
            case failureReason = "FailureReason"
            case languageCode = "LanguageCode"
            case lastModifiedTime = "LastModifiedTime"
            case vocabularyName = "VocabularyName"
            case vocabularyState = "VocabularyState"
        }
    }

    public struct DeleteLanguageModelRequest: AWSEncodableShape {
        /// The name of the model you're choosing to delete.
        public let modelName: String

        public init(modelName: String) {
            self.modelName = modelName
        }

        public func validate(name: String) throws {
            try self.validate(self.modelName, name: "modelName", parent: name, max: 200)
            try self.validate(self.modelName, name: "modelName", parent: name, min: 1)
            try self.validate(self.modelName, name: "modelName", parent: name, pattern: "^[0-9a-zA-Z._-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case modelName = "ModelName"
        }
    }

    public struct DeleteMedicalTranscriptionJobRequest: AWSEncodableShape {
        /// The name you provide to the DeleteMedicalTranscriptionJob object to delete a transcription job.
        public let medicalTranscriptionJobName: String

        public init(medicalTranscriptionJobName: String) {
            self.medicalTranscriptionJobName = medicalTranscriptionJobName
        }

        public func validate(name: String) throws {
            try self.validate(self.medicalTranscriptionJobName, name: "medicalTranscriptionJobName", parent: name, max: 200)
            try self.validate(self.medicalTranscriptionJobName, name: "medicalTranscriptionJobName", parent: name, min: 1)
            try self.validate(self.medicalTranscriptionJobName, name: "medicalTranscriptionJobName", parent: name, pattern: "^[0-9a-zA-Z._-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case medicalTranscriptionJobName = "MedicalTranscriptionJobName"
        }
    }

    public struct DeleteMedicalVocabularyRequest: AWSEncodableShape {
        /// The name of the vocabulary that you want to delete.
        public let vocabularyName: String

        public init(vocabularyName: String) {
            self.vocabularyName = vocabularyName
        }

        public func validate(name: String) throws {
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, max: 200)
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, min: 1)
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, pattern: "^[0-9a-zA-Z._-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case vocabularyName = "VocabularyName"
        }
    }

    public struct DeleteTranscriptionJobRequest: AWSEncodableShape {
        /// The name of the transcription job to be deleted.
        public let transcriptionJobName: String

        public init(transcriptionJobName: String) {
            self.transcriptionJobName = transcriptionJobName
        }

        public func validate(name: String) throws {
            try self.validate(self.transcriptionJobName, name: "transcriptionJobName", parent: name, max: 200)
            try self.validate(self.transcriptionJobName, name: "transcriptionJobName", parent: name, min: 1)
            try self.validate(self.transcriptionJobName, name: "transcriptionJobName", parent: name, pattern: "^[0-9a-zA-Z._-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case transcriptionJobName = "TranscriptionJobName"
        }
    }

    public struct DeleteVocabularyFilterRequest: AWSEncodableShape {
        /// The name of the vocabulary filter to remove.
        public let vocabularyFilterName: String

        public init(vocabularyFilterName: String) {
            self.vocabularyFilterName = vocabularyFilterName
        }

        public func validate(name: String) throws {
            try self.validate(self.vocabularyFilterName, name: "vocabularyFilterName", parent: name, max: 200)
            try self.validate(self.vocabularyFilterName, name: "vocabularyFilterName", parent: name, min: 1)
            try self.validate(self.vocabularyFilterName, name: "vocabularyFilterName", parent: name, pattern: "^[0-9a-zA-Z._-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case vocabularyFilterName = "VocabularyFilterName"
        }
    }

    public struct DeleteVocabularyRequest: AWSEncodableShape {
        /// The name of the vocabulary to delete.
        public let vocabularyName: String

        public init(vocabularyName: String) {
            self.vocabularyName = vocabularyName
        }

        public func validate(name: String) throws {
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, max: 200)
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, min: 1)
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, pattern: "^[0-9a-zA-Z._-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case vocabularyName = "VocabularyName"
        }
    }

    public struct DescribeLanguageModelRequest: AWSEncodableShape {
        /// The name of the custom language model you submit to get more information.
        public let modelName: String

        public init(modelName: String) {
            self.modelName = modelName
        }

        public func validate(name: String) throws {
            try self.validate(self.modelName, name: "modelName", parent: name, max: 200)
            try self.validate(self.modelName, name: "modelName", parent: name, min: 1)
            try self.validate(self.modelName, name: "modelName", parent: name, pattern: "^[0-9a-zA-Z._-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case modelName = "ModelName"
        }
    }

    public struct DescribeLanguageModelResponse: AWSDecodableShape {
        /// The name of the custom language model you requested more information about.
        public let languageModel: LanguageModel?

        public init(languageModel: LanguageModel? = nil) {
            self.languageModel = languageModel
        }

        private enum CodingKeys: String, CodingKey {
            case languageModel = "LanguageModel"
        }
    }

    public struct GetMedicalTranscriptionJobRequest: AWSEncodableShape {
        /// The name of the medical transcription job.
        public let medicalTranscriptionJobName: String

        public init(medicalTranscriptionJobName: String) {
            self.medicalTranscriptionJobName = medicalTranscriptionJobName
        }

        public func validate(name: String) throws {
            try self.validate(self.medicalTranscriptionJobName, name: "medicalTranscriptionJobName", parent: name, max: 200)
            try self.validate(self.medicalTranscriptionJobName, name: "medicalTranscriptionJobName", parent: name, min: 1)
            try self.validate(self.medicalTranscriptionJobName, name: "medicalTranscriptionJobName", parent: name, pattern: "^[0-9a-zA-Z._-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case medicalTranscriptionJobName = "MedicalTranscriptionJobName"
        }
    }

    public struct GetMedicalTranscriptionJobResponse: AWSDecodableShape {
        /// An object that contains the results of the medical transcription job.
        public let medicalTranscriptionJob: MedicalTranscriptionJob?

        public init(medicalTranscriptionJob: MedicalTranscriptionJob? = nil) {
            self.medicalTranscriptionJob = medicalTranscriptionJob
        }

        private enum CodingKeys: String, CodingKey {
            case medicalTranscriptionJob = "MedicalTranscriptionJob"
        }
    }

    public struct GetMedicalVocabularyRequest: AWSEncodableShape {
        /// The name of the vocabulary that you want information about. The value is case sensitive.
        public let vocabularyName: String

        public init(vocabularyName: String) {
            self.vocabularyName = vocabularyName
        }

        public func validate(name: String) throws {
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, max: 200)
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, min: 1)
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, pattern: "^[0-9a-zA-Z._-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case vocabularyName = "VocabularyName"
        }
    }

    public struct GetMedicalVocabularyResponse: AWSDecodableShape {
        /// The location in Amazon S3 where the vocabulary is stored. Use this URI to get the contents of the vocabulary. You can download your vocabulary from the URI for a limited time.
        public let downloadUri: String?
        /// If the VocabularyState is FAILED, this field contains information about why the job failed.
        public let failureReason: String?
        /// The valid language code for your vocabulary entries.
        public let languageCode: LanguageCode?
        /// The date and time that the vocabulary was last modified with a text file different from the one that was previously used.
        public let lastModifiedTime: Date?
        /// The name of the vocabulary returned by Amazon Transcribe Medical.
        public let vocabularyName: String?
        /// The processing state of the vocabulary. If the VocabularyState is READY then you can use it in the StartMedicalTranscriptionJob operation.
        public let vocabularyState: VocabularyState?

        public init(downloadUri: String? = nil, failureReason: String? = nil, languageCode: LanguageCode? = nil, lastModifiedTime: Date? = nil, vocabularyName: String? = nil, vocabularyState: VocabularyState? = nil) {
            self.downloadUri = downloadUri
            self.failureReason = failureReason
            self.languageCode = languageCode
            self.lastModifiedTime = lastModifiedTime
            self.vocabularyName = vocabularyName
            self.vocabularyState = vocabularyState
        }

        private enum CodingKeys: String, CodingKey {
            case downloadUri = "DownloadUri"
            case failureReason = "FailureReason"
            case languageCode = "LanguageCode"
            case lastModifiedTime = "LastModifiedTime"
            case vocabularyName = "VocabularyName"
            case vocabularyState = "VocabularyState"
        }
    }

    public struct GetTranscriptionJobRequest: AWSEncodableShape {
        /// The name of the job.
        public let transcriptionJobName: String

        public init(transcriptionJobName: String) {
            self.transcriptionJobName = transcriptionJobName
        }

        public func validate(name: String) throws {
            try self.validate(self.transcriptionJobName, name: "transcriptionJobName", parent: name, max: 200)
            try self.validate(self.transcriptionJobName, name: "transcriptionJobName", parent: name, min: 1)
            try self.validate(self.transcriptionJobName, name: "transcriptionJobName", parent: name, pattern: "^[0-9a-zA-Z._-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case transcriptionJobName = "TranscriptionJobName"
        }
    }

    public struct GetTranscriptionJobResponse: AWSDecodableShape {
        /// An object that contains the results of the transcription job.
        public let transcriptionJob: TranscriptionJob?

        public init(transcriptionJob: TranscriptionJob? = nil) {
            self.transcriptionJob = transcriptionJob
        }

        private enum CodingKeys: String, CodingKey {
            case transcriptionJob = "TranscriptionJob"
        }
    }

    public struct GetVocabularyFilterRequest: AWSEncodableShape {
        /// The name of the vocabulary filter for which to return information.
        public let vocabularyFilterName: String

        public init(vocabularyFilterName: String) {
            self.vocabularyFilterName = vocabularyFilterName
        }

        public func validate(name: String) throws {
            try self.validate(self.vocabularyFilterName, name: "vocabularyFilterName", parent: name, max: 200)
            try self.validate(self.vocabularyFilterName, name: "vocabularyFilterName", parent: name, min: 1)
            try self.validate(self.vocabularyFilterName, name: "vocabularyFilterName", parent: name, pattern: "^[0-9a-zA-Z._-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case vocabularyFilterName = "VocabularyFilterName"
        }
    }

    public struct GetVocabularyFilterResponse: AWSDecodableShape {
        /// The URI of the list of words in the vocabulary filter. You can use this URI to get the list of words.
        public let downloadUri: String?
        /// The language code of the words in the vocabulary filter.
        public let languageCode: LanguageCode?
        /// The date and time that the contents of the vocabulary filter were updated.
        public let lastModifiedTime: Date?
        /// The name of the vocabulary filter.
        public let vocabularyFilterName: String?

        public init(downloadUri: String? = nil, languageCode: LanguageCode? = nil, lastModifiedTime: Date? = nil, vocabularyFilterName: String? = nil) {
            self.downloadUri = downloadUri
            self.languageCode = languageCode
            self.lastModifiedTime = lastModifiedTime
            self.vocabularyFilterName = vocabularyFilterName
        }

        private enum CodingKeys: String, CodingKey {
            case downloadUri = "DownloadUri"
            case languageCode = "LanguageCode"
            case lastModifiedTime = "LastModifiedTime"
            case vocabularyFilterName = "VocabularyFilterName"
        }
    }

    public struct GetVocabularyRequest: AWSEncodableShape {
        /// The name of the vocabulary to return information about. The name is case sensitive.
        public let vocabularyName: String

        public init(vocabularyName: String) {
            self.vocabularyName = vocabularyName
        }

        public func validate(name: String) throws {
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, max: 200)
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, min: 1)
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, pattern: "^[0-9a-zA-Z._-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case vocabularyName = "VocabularyName"
        }
    }

    public struct GetVocabularyResponse: AWSDecodableShape {
        /// The S3 location where the vocabulary is stored. Use this URI to get the contents of the vocabulary. The URI is available for a limited time.
        public let downloadUri: String?
        /// If the VocabularyState field is FAILED, this field contains information about why the job failed.
        public let failureReason: String?
        /// The language code of the vocabulary entries.
        public let languageCode: LanguageCode?
        /// The date and time that the vocabulary was last modified.
        public let lastModifiedTime: Date?
        /// The name of the vocabulary to return.
        public let vocabularyName: String?
        /// The processing state of the vocabulary.
        public let vocabularyState: VocabularyState?

        public init(downloadUri: String? = nil, failureReason: String? = nil, languageCode: LanguageCode? = nil, lastModifiedTime: Date? = nil, vocabularyName: String? = nil, vocabularyState: VocabularyState? = nil) {
            self.downloadUri = downloadUri
            self.failureReason = failureReason
            self.languageCode = languageCode
            self.lastModifiedTime = lastModifiedTime
            self.vocabularyName = vocabularyName
            self.vocabularyState = vocabularyState
        }

        private enum CodingKeys: String, CodingKey {
            case downloadUri = "DownloadUri"
            case failureReason = "FailureReason"
            case languageCode = "LanguageCode"
            case lastModifiedTime = "LastModifiedTime"
            case vocabularyName = "VocabularyName"
            case vocabularyState = "VocabularyState"
        }
    }

    public struct InputDataConfig: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (ARN) that uniquely identifies the permissions you've given Amazon Transcribe to access your Amazon S3 buckets containing your media files or text data.
        public let dataAccessRoleArn: String
        /// The Amazon S3 prefix you specify to access the plain text files that you use to train your custom language model.
        public let s3Uri: String
        /// The Amazon S3 prefix you specify to access the plain text files that you use to tune your custom language model.
        public let tuningDataS3Uri: String?

        public init(dataAccessRoleArn: String, s3Uri: String, tuningDataS3Uri: String? = nil) {
            self.dataAccessRoleArn = dataAccessRoleArn
            self.s3Uri = s3Uri
            self.tuningDataS3Uri = tuningDataS3Uri
        }

        public func validate(name: String) throws {
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso-{0,1}[a-z]{0,1}):iam::[0-9]{0,63}:role/[A-Za-z0-9:_/+=,@.-]{0,1024}$")
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, max: 2000)
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, min: 1)
            try self.validate(self.s3Uri, name: "s3Uri", parent: name, pattern: "(s3://|http(s*)://).+")
            try self.validate(self.tuningDataS3Uri, name: "tuningDataS3Uri", parent: name, max: 2000)
            try self.validate(self.tuningDataS3Uri, name: "tuningDataS3Uri", parent: name, min: 1)
            try self.validate(self.tuningDataS3Uri, name: "tuningDataS3Uri", parent: name, pattern: "(s3://|http(s*)://).+")
        }

        private enum CodingKeys: String, CodingKey {
            case dataAccessRoleArn = "DataAccessRoleArn"
            case s3Uri = "S3Uri"
            case tuningDataS3Uri = "TuningDataS3Uri"
        }
    }

    public struct JobExecutionSettings: AWSEncodableShape & AWSDecodableShape {
        /// Indicates whether a job should be queued by Amazon Transcribe when the concurrent execution limit is exceeded. When the AllowDeferredExecution field is true, jobs are queued and executed when the number of executing jobs falls below the concurrent execution limit. If the field is false, Amazon Transcribe returns a LimitExceededException exception. If you specify the AllowDeferredExecution field, you must specify the DataAccessRoleArn field.
        public let allowDeferredExecution: Bool?
        /// The Amazon Resource Name (ARN) of a role that has access to the S3 bucket that contains the input files. Amazon Transcribe assumes this role to read queued media files. If you have specified an output S3 bucket for the transcription results, this role should have access to the output bucket as well. If you specify the AllowDeferredExecution field, you must specify the DataAccessRoleArn field.
        public let dataAccessRoleArn: String?

        public init(allowDeferredExecution: Bool? = nil, dataAccessRoleArn: String? = nil) {
            self.allowDeferredExecution = allowDeferredExecution
            self.dataAccessRoleArn = dataAccessRoleArn
        }

        public func validate(name: String) throws {
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, max: 2048)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, min: 20)
            try self.validate(self.dataAccessRoleArn, name: "dataAccessRoleArn", parent: name, pattern: "^arn:(aws|aws-cn|aws-us-gov|aws-iso-{0,1}[a-z]{0,1}):iam::[0-9]{0,63}:role/[A-Za-z0-9:_/+=,@.-]{0,1024}$")
        }

        private enum CodingKeys: String, CodingKey {
            case allowDeferredExecution = "AllowDeferredExecution"
            case dataAccessRoleArn = "DataAccessRoleArn"
        }
    }

    public struct LanguageModel: AWSDecodableShape {
        /// The Amazon Transcribe standard language model, or base model used to create the custom language model.
        public let baseModelName: BaseModelName?
        /// The time the custom language model was created.
        public let createTime: Date?
        /// The reason why the custom language model couldn't be created.
        public let failureReason: String?
        /// The data access role and Amazon S3 prefixes for the input files used to train the custom language model.
        public let inputDataConfig: InputDataConfig?
        /// The language code you used to create your custom language model.
        public let languageCode: CLMLanguageCode?
        /// The most recent time the custom language model was modified.
        public let lastModifiedTime: Date?
        /// The name of the custom language model.
        public let modelName: String?
        /// The creation status of a custom language model. When the status is COMPLETED the model is ready for use.
        public let modelStatus: ModelStatus?
        /// Whether the base model used for the custom language model is up to date. If this field is true then you are running the most up-to-date version of the base model in your custom language model.
        public let upgradeAvailability: Bool?

        public init(baseModelName: BaseModelName? = nil, createTime: Date? = nil, failureReason: String? = nil, inputDataConfig: InputDataConfig? = nil, languageCode: CLMLanguageCode? = nil, lastModifiedTime: Date? = nil, modelName: String? = nil, modelStatus: ModelStatus? = nil, upgradeAvailability: Bool? = nil) {
            self.baseModelName = baseModelName
            self.createTime = createTime
            self.failureReason = failureReason
            self.inputDataConfig = inputDataConfig
            self.languageCode = languageCode
            self.lastModifiedTime = lastModifiedTime
            self.modelName = modelName
            self.modelStatus = modelStatus
            self.upgradeAvailability = upgradeAvailability
        }

        private enum CodingKeys: String, CodingKey {
            case baseModelName = "BaseModelName"
            case createTime = "CreateTime"
            case failureReason = "FailureReason"
            case inputDataConfig = "InputDataConfig"
            case languageCode = "LanguageCode"
            case lastModifiedTime = "LastModifiedTime"
            case modelName = "ModelName"
            case modelStatus = "ModelStatus"
            case upgradeAvailability = "UpgradeAvailability"
        }
    }

    public struct ListLanguageModelsRequest: AWSEncodableShape {
        /// The maximum number of language models to return in the response. If there are fewer results in the list, the response contains only the actual results.
        public let maxResults: Int?
        /// When specified, the custom language model names returned contain the substring you've specified.
        public let nameContains: String?
        /// When included, fetches the next set of jobs if the result of the previous request was truncated.
        public let nextToken: String?
        /// When specified, returns only custom language models with the specified status. Language models are ordered by creation date, with the newest models first. If you don't specify a status, Amazon Transcribe returns all custom language models ordered by date.
        public let statusEquals: ModelStatus?

        public init(maxResults: Int? = nil, nameContains: String? = nil, nextToken: String? = nil, statusEquals: ModelStatus? = nil) {
            self.maxResults = maxResults
            self.nameContains = nameContains
            self.nextToken = nextToken
            self.statusEquals = statusEquals
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nameContains, name: "nameContains", parent: name, max: 200)
            try self.validate(self.nameContains, name: "nameContains", parent: name, min: 1)
            try self.validate(self.nameContains, name: "nameContains", parent: name, pattern: "^[0-9a-zA-Z._-]+")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 8192)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: ".+")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nameContains = "NameContains"
            case nextToken = "NextToken"
            case statusEquals = "StatusEquals"
        }
    }

    public struct ListLanguageModelsResponse: AWSDecodableShape {
        /// A list of objects containing information about custom language models.
        public let models: [LanguageModel]?
        /// The operation returns a page of jobs at a time. The maximum size of the list is set by the MaxResults parameter. If there are more language models in the list than the page size, Amazon Transcribe returns the NextPage token. Include the token in the next request to the operation to return the next page of language models.
        public let nextToken: String?

        public init(models: [LanguageModel]? = nil, nextToken: String? = nil) {
            self.models = models
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case models = "Models"
            case nextToken = "NextToken"
        }
    }

    public struct ListMedicalTranscriptionJobsRequest: AWSEncodableShape {
        /// When specified, the jobs returned in the list are limited to jobs whose name contains the specified string.
        public let jobNameContains: String?
        /// The maximum number of medical transcription jobs to return in the response. IF there are fewer results in the list, this response contains only the actual results.
        public let maxResults: Int?
        /// If you a receive a truncated result in the previous request of ListMedicalTranscriptionJobs, include NextToken to fetch the next set of jobs.
        public let nextToken: String?
        /// When specified, returns only medical transcription jobs with the specified status. Jobs are ordered by creation date, with the newest jobs returned first. If you don't specify a status, Amazon Transcribe Medical returns all transcription jobs ordered by creation date.
        public let status: TranscriptionJobStatus?

        public init(jobNameContains: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, status: TranscriptionJobStatus? = nil) {
            self.jobNameContains = jobNameContains
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.status = status
        }

        public func validate(name: String) throws {
            try self.validate(self.jobNameContains, name: "jobNameContains", parent: name, max: 200)
            try self.validate(self.jobNameContains, name: "jobNameContains", parent: name, min: 1)
            try self.validate(self.jobNameContains, name: "jobNameContains", parent: name, pattern: "^[0-9a-zA-Z._-]+")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 8192)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: ".+")
        }

        private enum CodingKeys: String, CodingKey {
            case jobNameContains = "JobNameContains"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case status = "Status"
        }
    }

    public struct ListMedicalTranscriptionJobsResponse: AWSDecodableShape {
        /// A list of objects containing summary information for a transcription job.
        public let medicalTranscriptionJobSummaries: [MedicalTranscriptionJobSummary]?
        /// The ListMedicalTranscriptionJobs operation returns a page of jobs at a time. The maximum size of the page is set by the MaxResults parameter. If the number of jobs exceeds what can fit on a page, Amazon Transcribe Medical returns the NextPage token. Include the token in the next request to the ListMedicalTranscriptionJobs operation to return in the next page of jobs.
        public let nextToken: String?
        /// The requested status of the medical transcription jobs returned.
        public let status: TranscriptionJobStatus?

        public init(medicalTranscriptionJobSummaries: [MedicalTranscriptionJobSummary]? = nil, nextToken: String? = nil, status: TranscriptionJobStatus? = nil) {
            self.medicalTranscriptionJobSummaries = medicalTranscriptionJobSummaries
            self.nextToken = nextToken
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case medicalTranscriptionJobSummaries = "MedicalTranscriptionJobSummaries"
            case nextToken = "NextToken"
            case status = "Status"
        }
    }

    public struct ListMedicalVocabulariesRequest: AWSEncodableShape {
        /// The maximum number of vocabularies to return in the response.
        public let maxResults: Int?
        /// Returns vocabularies whose names contain the specified string. The search is not case sensitive. ListMedicalVocabularies returns both "vocabularyname" and "VocabularyName".
        public let nameContains: String?
        /// If the result of your previous request to ListMedicalVocabularies was truncated, include the NextToken to fetch the next set of vocabularies.
        public let nextToken: String?
        /// When specified, returns only vocabularies with the VocabularyState equal to the specified vocabulary state. Use this field to see which vocabularies are ready for your medical transcription jobs.
        public let stateEquals: VocabularyState?

        public init(maxResults: Int? = nil, nameContains: String? = nil, nextToken: String? = nil, stateEquals: VocabularyState? = nil) {
            self.maxResults = maxResults
            self.nameContains = nameContains
            self.nextToken = nextToken
            self.stateEquals = stateEquals
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nameContains, name: "nameContains", parent: name, max: 200)
            try self.validate(self.nameContains, name: "nameContains", parent: name, min: 1)
            try self.validate(self.nameContains, name: "nameContains", parent: name, pattern: "^[0-9a-zA-Z._-]+")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 8192)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: ".+")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nameContains = "NameContains"
            case nextToken = "NextToken"
            case stateEquals = "StateEquals"
        }
    }

    public struct ListMedicalVocabulariesResponse: AWSDecodableShape {
        /// The ListMedicalVocabularies operation returns a page of vocabularies at a time. You set the maximum number of vocabularies to return on a page with the MaxResults parameter. If there are more jobs in the list will fit on a page, Amazon Transcribe Medical returns the NextPage token. To return the next page of vocabularies, include the token in the next request to the ListMedicalVocabularies operation .
        public let nextToken: String?
        /// The requested vocabulary state.
        public let status: VocabularyState?
        /// A list of objects that describe the vocabularies that match your search criteria.
        public let vocabularies: [VocabularyInfo]?

        public init(nextToken: String? = nil, status: VocabularyState? = nil, vocabularies: [VocabularyInfo]? = nil) {
            self.nextToken = nextToken
            self.status = status
            self.vocabularies = vocabularies
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case status = "Status"
            case vocabularies = "Vocabularies"
        }
    }

    public struct ListTranscriptionJobsRequest: AWSEncodableShape {
        /// When specified, the jobs returned in the list are limited to jobs whose name contains the specified string.
        public let jobNameContains: String?
        /// The maximum number of jobs to return in the response. If there are fewer results in the list, this response contains only the actual results.
        public let maxResults: Int?
        /// If the result of the previous request to ListTranscriptionJobs was truncated, include the NextToken to fetch the next set of jobs.
        public let nextToken: String?
        /// When specified, returns only transcription jobs with the specified status. Jobs are ordered by creation date, with the newest jobs returned first. If you don’t specify a status, Amazon Transcribe returns all transcription jobs ordered by creation date.
        public let status: TranscriptionJobStatus?

        public init(jobNameContains: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, status: TranscriptionJobStatus? = nil) {
            self.jobNameContains = jobNameContains
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.status = status
        }

        public func validate(name: String) throws {
            try self.validate(self.jobNameContains, name: "jobNameContains", parent: name, max: 200)
            try self.validate(self.jobNameContains, name: "jobNameContains", parent: name, min: 1)
            try self.validate(self.jobNameContains, name: "jobNameContains", parent: name, pattern: "^[0-9a-zA-Z._-]+")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 8192)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: ".+")
        }

        private enum CodingKeys: String, CodingKey {
            case jobNameContains = "JobNameContains"
            case maxResults = "MaxResults"
            case nextToken = "NextToken"
            case status = "Status"
        }
    }

    public struct ListTranscriptionJobsResponse: AWSDecodableShape {
        /// The ListTranscriptionJobs operation returns a page of jobs at a time. The maximum size of the page is set by the MaxResults parameter. If there are more jobs in the list than the page size, Amazon Transcribe returns the NextPage token. Include the token in the next request to the ListTranscriptionJobs operation to return in the next page of jobs.
        public let nextToken: String?
        /// The requested status of the jobs returned.
        public let status: TranscriptionJobStatus?
        /// A list of objects containing summary information for a transcription job.
        public let transcriptionJobSummaries: [TranscriptionJobSummary]?

        public init(nextToken: String? = nil, status: TranscriptionJobStatus? = nil, transcriptionJobSummaries: [TranscriptionJobSummary]? = nil) {
            self.nextToken = nextToken
            self.status = status
            self.transcriptionJobSummaries = transcriptionJobSummaries
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case status = "Status"
            case transcriptionJobSummaries = "TranscriptionJobSummaries"
        }
    }

    public struct ListVocabulariesRequest: AWSEncodableShape {
        /// The maximum number of vocabularies to return in the response. If there are fewer results in the list, this response contains only the actual results.
        public let maxResults: Int?
        /// When specified, the vocabularies returned in the list are limited to vocabularies whose name contains the specified string. The search is not case sensitive, ListVocabularies returns both "vocabularyname" and "VocabularyName" in the response list.
        public let nameContains: String?
        /// If the result of the previous request to ListVocabularies was truncated, include the NextToken to fetch the next set of jobs.
        public let nextToken: String?
        /// When specified, only returns vocabularies with the VocabularyState field equal to the specified state.
        public let stateEquals: VocabularyState?

        public init(maxResults: Int? = nil, nameContains: String? = nil, nextToken: String? = nil, stateEquals: VocabularyState? = nil) {
            self.maxResults = maxResults
            self.nameContains = nameContains
            self.nextToken = nextToken
            self.stateEquals = stateEquals
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nameContains, name: "nameContains", parent: name, max: 200)
            try self.validate(self.nameContains, name: "nameContains", parent: name, min: 1)
            try self.validate(self.nameContains, name: "nameContains", parent: name, pattern: "^[0-9a-zA-Z._-]+")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 8192)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: ".+")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nameContains = "NameContains"
            case nextToken = "NextToken"
            case stateEquals = "StateEquals"
        }
    }

    public struct ListVocabulariesResponse: AWSDecodableShape {
        /// The ListVocabularies operation returns a page of vocabularies at a time. The maximum size of the page is set in the MaxResults parameter. If there are more jobs in the list than will fit on the page, Amazon Transcribe returns the NextPage token. To return in the next page of jobs, include the token in the next request to the ListVocabularies operation.
        public let nextToken: String?
        /// The requested vocabulary state.
        public let status: VocabularyState?
        /// A list of objects that describe the vocabularies that match the search criteria in the request.
        public let vocabularies: [VocabularyInfo]?

        public init(nextToken: String? = nil, status: VocabularyState? = nil, vocabularies: [VocabularyInfo]? = nil) {
            self.nextToken = nextToken
            self.status = status
            self.vocabularies = vocabularies
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case status = "Status"
            case vocabularies = "Vocabularies"
        }
    }

    public struct ListVocabularyFiltersRequest: AWSEncodableShape {
        /// The maximum number of filters to return in the response. If there are fewer results in the list, this response contains only the actual results.
        public let maxResults: Int?
        /// Filters the response so that it only contains vocabulary filters whose name contains the specified string.
        public let nameContains: String?
        /// If the result of the previous request to ListVocabularyFilters was truncated, include the NextToken to fetch the next set of collections.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nameContains: String? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nameContains = nameContains
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 100)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.nameContains, name: "nameContains", parent: name, max: 200)
            try self.validate(self.nameContains, name: "nameContains", parent: name, min: 1)
            try self.validate(self.nameContains, name: "nameContains", parent: name, pattern: "^[0-9a-zA-Z._-]+")
            try self.validate(self.nextToken, name: "nextToken", parent: name, max: 8192)
            try self.validate(self.nextToken, name: "nextToken", parent: name, pattern: ".+")
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults = "MaxResults"
            case nameContains = "NameContains"
            case nextToken = "NextToken"
        }
    }

    public struct ListVocabularyFiltersResponse: AWSDecodableShape {
        /// The ListVocabularyFilters operation returns a page of collections at a time. The maximum size of the page is set by the MaxResults parameter. If there are more jobs in the list than the page size, Amazon Transcribe returns the NextPage token. Include the token in the next request to the ListVocabularyFilters operation to return in the next page of jobs.
        public let nextToken: String?
        /// The list of vocabulary filters. It contains at most MaxResults number of filters. If there are more filters, call the ListVocabularyFilters operation again with the NextToken parameter in the request set to the value of the NextToken field in the response.
        public let vocabularyFilters: [VocabularyFilterInfo]?

        public init(nextToken: String? = nil, vocabularyFilters: [VocabularyFilterInfo]? = nil) {
            self.nextToken = nextToken
            self.vocabularyFilters = vocabularyFilters
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken = "NextToken"
            case vocabularyFilters = "VocabularyFilters"
        }
    }

    public struct Media: AWSEncodableShape & AWSDecodableShape {
        /// The S3 object location of the input media file. The URI must be in the same region as the API endpoint that you are calling. The general form is: For example: For more information about S3 object names, see Object Keys in the Amazon S3 Developer Guide.
        public let mediaFileUri: String?

        public init(mediaFileUri: String? = nil) {
            self.mediaFileUri = mediaFileUri
        }

        public func validate(name: String) throws {
            try self.validate(self.mediaFileUri, name: "mediaFileUri", parent: name, max: 2000)
            try self.validate(self.mediaFileUri, name: "mediaFileUri", parent: name, min: 1)
            try self.validate(self.mediaFileUri, name: "mediaFileUri", parent: name, pattern: "(s3://|http(s*)://).+")
        }

        private enum CodingKeys: String, CodingKey {
            case mediaFileUri = "MediaFileUri"
        }
    }

    public struct MedicalTranscript: AWSDecodableShape {
        /// The S3 object location of the medical transcript. Use this URI to access the medical transcript. This URI points to the S3 bucket you created to store the medical transcript.
        public let transcriptFileUri: String?

        public init(transcriptFileUri: String? = nil) {
            self.transcriptFileUri = transcriptFileUri
        }

        private enum CodingKeys: String, CodingKey {
            case transcriptFileUri = "TranscriptFileUri"
        }
    }

    public struct MedicalTranscriptionJob: AWSDecodableShape {
        /// A timestamp that shows when the job was completed.
        public let completionTime: Date?
        /// A timestamp that shows when the job was created.
        public let creationTime: Date?
        /// If the TranscriptionJobStatus field is FAILED, this field contains information about why the job failed. The FailureReason field contains one of the following values:    Unsupported media format- The media format specified in the MediaFormat field of the request isn't valid. See the description of the MediaFormat field for a list of valid values.    The media format provided does not match the detected media format- The media format of the audio file doesn't match the format specified in the MediaFormat field in the request. Check the media format of your media file and make sure the two values match.    Invalid sample rate for audio file- The sample rate specified in the MediaSampleRateHertz of the request isn't valid. The sample rate must be between 8000 and 48000 Hertz.    The sample rate provided does not match the detected sample rate- The sample rate in the audio file doesn't match the sample rate specified in the MediaSampleRateHertz field in the request. Check the sample rate of your media file and make sure that the two values match.    Invalid file size: file size too large- The size of your audio file is larger than what Amazon Transcribe Medical can process. For more information, see Guidelines and Quotas in the Amazon Transcribe Medical Guide     Invalid number of channels: number of channels too large- Your audio contains more channels than Amazon Transcribe Medical is configured to process. To request additional channels, see Amazon Transcribe Medical Endpoints and Quotas in the Amazon Web Services General Reference
        public let failureReason: String?
        /// The language code for the language spoken in the source audio file. US English (en-US) is the only supported language for medical transcriptions. Any other value you enter for language code results in a BadRequestException error.
        public let languageCode: LanguageCode?
        public let media: Media?
        /// The format of the input media file.
        public let mediaFormat: MediaFormat?
        /// The sample rate, in Hertz, of the source audio containing medical information. If you don't specify the sample rate, Amazon Transcribe Medical determines it for you. If you choose to specify the sample rate, it must match the rate detected by Amazon Transcribe Medical. In most cases, you should leave the MediaSampleHertz blank and let Amazon Transcribe Medical determine the sample rate.
        public let mediaSampleRateHertz: Int?
        /// The name for a given medical transcription job.
        public let medicalTranscriptionJobName: String?
        /// Object that contains object.
        public let settings: MedicalTranscriptionSetting?
        /// The medical specialty of any clinicians providing a dictation or having a conversation. PRIMARYCARE is the only available setting for this object. This specialty enables you to generate transcriptions for the following medical fields:   Family Medicine
        public let specialty: Specialty?
        /// A timestamp that shows when the job started processing.
        public let startTime: Date?
        /// An object that contains the MedicalTranscript. The MedicalTranscript contains the TranscriptFileUri.
        public let transcript: MedicalTranscript?
        /// The completion status of a medical transcription job.
        public let transcriptionJobStatus: TranscriptionJobStatus?
        /// The type of speech in the transcription job. CONVERSATION is generally used for patient-physician dialogues. DICTATION is the setting for physicians speaking their notes after seeing a patient. For more information, see how-it-works-med
        public let type: `Type`?

        public init(completionTime: Date? = nil, creationTime: Date? = nil, failureReason: String? = nil, languageCode: LanguageCode? = nil, media: Media? = nil, mediaFormat: MediaFormat? = nil, mediaSampleRateHertz: Int? = nil, medicalTranscriptionJobName: String? = nil, settings: MedicalTranscriptionSetting? = nil, specialty: Specialty? = nil, startTime: Date? = nil, transcript: MedicalTranscript? = nil, transcriptionJobStatus: TranscriptionJobStatus? = nil, type: `Type`? = nil) {
            self.completionTime = completionTime
            self.creationTime = creationTime
            self.failureReason = failureReason
            self.languageCode = languageCode
            self.media = media
            self.mediaFormat = mediaFormat
            self.mediaSampleRateHertz = mediaSampleRateHertz
            self.medicalTranscriptionJobName = medicalTranscriptionJobName
            self.settings = settings
            self.specialty = specialty
            self.startTime = startTime
            self.transcript = transcript
            self.transcriptionJobStatus = transcriptionJobStatus
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case completionTime = "CompletionTime"
            case creationTime = "CreationTime"
            case failureReason = "FailureReason"
            case languageCode = "LanguageCode"
            case media = "Media"
            case mediaFormat = "MediaFormat"
            case mediaSampleRateHertz = "MediaSampleRateHertz"
            case medicalTranscriptionJobName = "MedicalTranscriptionJobName"
            case settings = "Settings"
            case specialty = "Specialty"
            case startTime = "StartTime"
            case transcript = "Transcript"
            case transcriptionJobStatus = "TranscriptionJobStatus"
            case type = "Type"
        }
    }

    public struct MedicalTranscriptionJobSummary: AWSDecodableShape {
        /// A timestamp that shows when the job was completed.
        public let completionTime: Date?
        /// A timestamp that shows when the medical transcription job was created.
        public let creationTime: Date?
        /// If the TranscriptionJobStatus field is FAILED, a description of the error.
        public let failureReason: String?
        /// The language of the transcript in the source audio file.
        public let languageCode: LanguageCode?
        /// The name of a medical transcription job.
        public let medicalTranscriptionJobName: String?
        /// Indicates the location of the transcription job's output. The CUSTOMER_BUCKET is the S3 location provided in the OutputBucketName field when the
        public let outputLocationType: OutputLocationType?
        /// The medical specialty of the transcription job. Primary care is the only valid value.
        public let specialty: Specialty?
        /// A timestamp that shows when the job began processing.
        public let startTime: Date?
        /// The status of the medical transcription job.
        public let transcriptionJobStatus: TranscriptionJobStatus?
        /// The speech of the clinician in the input audio.
        public let type: `Type`?

        public init(completionTime: Date? = nil, creationTime: Date? = nil, failureReason: String? = nil, languageCode: LanguageCode? = nil, medicalTranscriptionJobName: String? = nil, outputLocationType: OutputLocationType? = nil, specialty: Specialty? = nil, startTime: Date? = nil, transcriptionJobStatus: TranscriptionJobStatus? = nil, type: `Type`? = nil) {
            self.completionTime = completionTime
            self.creationTime = creationTime
            self.failureReason = failureReason
            self.languageCode = languageCode
            self.medicalTranscriptionJobName = medicalTranscriptionJobName
            self.outputLocationType = outputLocationType
            self.specialty = specialty
            self.startTime = startTime
            self.transcriptionJobStatus = transcriptionJobStatus
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case completionTime = "CompletionTime"
            case creationTime = "CreationTime"
            case failureReason = "FailureReason"
            case languageCode = "LanguageCode"
            case medicalTranscriptionJobName = "MedicalTranscriptionJobName"
            case outputLocationType = "OutputLocationType"
            case specialty = "Specialty"
            case startTime = "StartTime"
            case transcriptionJobStatus = "TranscriptionJobStatus"
            case type = "Type"
        }
    }

    public struct MedicalTranscriptionSetting: AWSEncodableShape & AWSDecodableShape {
        /// Instructs Amazon Transcribe Medical to process each audio channel separately and then merge the transcription output of each channel into a single transcription. Amazon Transcribe Medical also produces a transcription of each item detected on an audio channel, including the start time and end time of the item and alternative transcriptions of item. The alternative transcriptions also come with confidence scores provided by Amazon Transcribe Medical. You can't set both ShowSpeakerLabels and ChannelIdentification in the same request. If you set both, your request returns a BadRequestException
        public let channelIdentification: Bool?
        /// The maximum number of alternatives that you tell the service to return. If you specify the MaxAlternatives field, you must set the ShowAlternatives field to true.
        public let maxAlternatives: Int?
        /// The maximum number of speakers to identify in the input audio. If there are more speakers in the audio than this number, multiple speakers are identified as a single speaker. If you specify the MaxSpeakerLabels field, you must set the ShowSpeakerLabels field to true.
        public let maxSpeakerLabels: Int?
        /// Determines whether alternative transcripts are generated along with the transcript that has the highest confidence. If you set ShowAlternatives field to true, you must also set the maximum number of alternatives to return in the MaxAlternatives field.
        public let showAlternatives: Bool?
        /// Determines whether the transcription job uses speaker recognition to identify different speakers in the input audio. Speaker recognition labels individual speakers in the audio file. If you set the ShowSpeakerLabels field to true, you must also set the maximum number of speaker labels in the MaxSpeakerLabels field. You can't set both ShowSpeakerLabels and ChannelIdentification in the same request. If you set both, your request returns a BadRequestException.
        public let showSpeakerLabels: Bool?
        /// The name of the vocabulary to use when processing a medical transcription job.
        public let vocabularyName: String?

        public init(channelIdentification: Bool? = nil, maxAlternatives: Int? = nil, maxSpeakerLabels: Int? = nil, showAlternatives: Bool? = nil, showSpeakerLabels: Bool? = nil, vocabularyName: String? = nil) {
            self.channelIdentification = channelIdentification
            self.maxAlternatives = maxAlternatives
            self.maxSpeakerLabels = maxSpeakerLabels
            self.showAlternatives = showAlternatives
            self.showSpeakerLabels = showSpeakerLabels
            self.vocabularyName = vocabularyName
        }

        public func validate(name: String) throws {
            try self.validate(self.maxAlternatives, name: "maxAlternatives", parent: name, max: 10)
            try self.validate(self.maxAlternatives, name: "maxAlternatives", parent: name, min: 2)
            try self.validate(self.maxSpeakerLabels, name: "maxSpeakerLabels", parent: name, max: 10)
            try self.validate(self.maxSpeakerLabels, name: "maxSpeakerLabels", parent: name, min: 2)
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, max: 200)
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, min: 1)
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, pattern: "^[0-9a-zA-Z._-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case channelIdentification = "ChannelIdentification"
            case maxAlternatives = "MaxAlternatives"
            case maxSpeakerLabels = "MaxSpeakerLabels"
            case showAlternatives = "ShowAlternatives"
            case showSpeakerLabels = "ShowSpeakerLabels"
            case vocabularyName = "VocabularyName"
        }
    }

    public struct ModelSettings: AWSEncodableShape & AWSDecodableShape {
        /// The name of your custom language model.
        public let languageModelName: String?

        public init(languageModelName: String? = nil) {
            self.languageModelName = languageModelName
        }

        public func validate(name: String) throws {
            try self.validate(self.languageModelName, name: "languageModelName", parent: name, max: 200)
            try self.validate(self.languageModelName, name: "languageModelName", parent: name, min: 1)
            try self.validate(self.languageModelName, name: "languageModelName", parent: name, pattern: "^[0-9a-zA-Z._-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case languageModelName = "LanguageModelName"
        }
    }

    public struct Settings: AWSEncodableShape & AWSDecodableShape {
        /// Instructs Amazon Transcribe to process each audio channel separately and then merge the transcription output of each channel into a single transcription.  Amazon Transcribe also produces a transcription of each item detected on an audio channel, including the start time and end time of the item and alternative transcriptions of the item including the confidence that Amazon Transcribe has in the transcription. You can't set both ShowSpeakerLabels and ChannelIdentification in the same request. If you set both, your request returns a BadRequestException.
        public let channelIdentification: Bool?
        /// The number of alternative transcriptions that the service should return. If you specify the MaxAlternatives field, you must set the ShowAlternatives field to true.
        public let maxAlternatives: Int?
        /// The maximum number of speakers to identify in the input audio. If there are more speakers in the audio than this number, multiple speakers are identified as a single speaker. If you specify the MaxSpeakerLabels field, you must set the ShowSpeakerLabels field to true.
        public let maxSpeakerLabels: Int?
        /// Determines whether the transcription contains alternative transcriptions. If you set the ShowAlternatives field to true, you must also set the maximum number of alternatives to return in the MaxAlternatives field.
        public let showAlternatives: Bool?
        /// Determines whether the transcription job uses speaker recognition to identify different speakers in the input audio. Speaker recognition labels individual speakers in the audio file. If you set the ShowSpeakerLabels field to true, you must also set the maximum number of speaker labels MaxSpeakerLabels field. You can't set both ShowSpeakerLabels and ChannelIdentification in the same request. If you set both, your request returns a BadRequestException.
        public let showSpeakerLabels: Bool?
        /// Set to mask to remove filtered text from the transcript and replace it with three asterisks ("***") as placeholder text. Set to remove to remove filtered text from the transcript without using placeholder text.
        public let vocabularyFilterMethod: VocabularyFilterMethod?
        /// The name of the vocabulary filter to use when transcribing the audio. The filter that you specify must have the same language code as the transcription job.
        public let vocabularyFilterName: String?
        /// The name of a vocabulary to use when processing the transcription job.
        public let vocabularyName: String?

        public init(channelIdentification: Bool? = nil, maxAlternatives: Int? = nil, maxSpeakerLabels: Int? = nil, showAlternatives: Bool? = nil, showSpeakerLabels: Bool? = nil, vocabularyFilterMethod: VocabularyFilterMethod? = nil, vocabularyFilterName: String? = nil, vocabularyName: String? = nil) {
            self.channelIdentification = channelIdentification
            self.maxAlternatives = maxAlternatives
            self.maxSpeakerLabels = maxSpeakerLabels
            self.showAlternatives = showAlternatives
            self.showSpeakerLabels = showSpeakerLabels
            self.vocabularyFilterMethod = vocabularyFilterMethod
            self.vocabularyFilterName = vocabularyFilterName
            self.vocabularyName = vocabularyName
        }

        public func validate(name: String) throws {
            try self.validate(self.maxAlternatives, name: "maxAlternatives", parent: name, max: 10)
            try self.validate(self.maxAlternatives, name: "maxAlternatives", parent: name, min: 2)
            try self.validate(self.maxSpeakerLabels, name: "maxSpeakerLabels", parent: name, max: 10)
            try self.validate(self.maxSpeakerLabels, name: "maxSpeakerLabels", parent: name, min: 2)
            try self.validate(self.vocabularyFilterName, name: "vocabularyFilterName", parent: name, max: 200)
            try self.validate(self.vocabularyFilterName, name: "vocabularyFilterName", parent: name, min: 1)
            try self.validate(self.vocabularyFilterName, name: "vocabularyFilterName", parent: name, pattern: "^[0-9a-zA-Z._-]+")
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, max: 200)
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, min: 1)
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, pattern: "^[0-9a-zA-Z._-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case channelIdentification = "ChannelIdentification"
            case maxAlternatives = "MaxAlternatives"
            case maxSpeakerLabels = "MaxSpeakerLabels"
            case showAlternatives = "ShowAlternatives"
            case showSpeakerLabels = "ShowSpeakerLabels"
            case vocabularyFilterMethod = "VocabularyFilterMethod"
            case vocabularyFilterName = "VocabularyFilterName"
            case vocabularyName = "VocabularyName"
        }
    }

    public struct StartMedicalTranscriptionJobRequest: AWSEncodableShape {
        /// The language code for the language spoken in the input media file. US English (en-US) is the valid value for medical transcription jobs. Any other value you enter for language code results in a BadRequestException error.
        public let languageCode: LanguageCode
        public let media: Media
        /// The audio format of the input media file.
        public let mediaFormat: MediaFormat?
        /// The sample rate, in Hertz, of the audio track in the input media file. If you do not specify the media sample rate, Amazon Transcribe Medical determines the sample rate. If you specify the sample rate, it must match the rate detected by Amazon Transcribe Medical. In most cases, you should leave the MediaSampleRateHertz field blank and let Amazon Transcribe Medical determine the sample rate.
        public let mediaSampleRateHertz: Int?
        /// The name of the medical transcription job. You can't use the strings "." or ".." by themselves as the job name. The name must also be unique within an AWS account. If you try to create a medical transcription job with the same name as a previous medical transcription job, you get a ConflictException error.
        public let medicalTranscriptionJobName: String
        /// The Amazon S3 location where the transcription is stored. You must set OutputBucketName for Amazon Transcribe Medical to store the transcription results. Your transcript appears in the S3 location you specify. When you call the GetMedicalTranscriptionJob, the operation returns this location in the TranscriptFileUri field. The S3 bucket must have permissions that allow Amazon Transcribe Medical to put files in the bucket. For more information, see Permissions Required for IAM User Roles. You can specify an AWS Key Management Service (KMS) key to encrypt the output of your transcription using the OutputEncryptionKMSKeyId parameter. If you don't specify a KMS key, Amazon Transcribe Medical uses the default Amazon S3 key for server-side encryption of transcripts that are placed in your S3 bucket.
        public let outputBucketName: String
        /// The Amazon Resource Name (ARN) of the AWS Key Management Service (KMS) key used to encrypt the output of the transcription job. The user calling the StartMedicalTranscriptionJob operation must have permission to use the specified KMS key. You use either of the following to identify a KMS key in the current account:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"   KMS Key Alias: "alias/ExampleAlias"   You can use either of the following to identify a KMS key in the current account or another account:   Amazon Resource Name (ARN) of a KMS key in the current account or another account: "arn:aws:kms:region:account ID:key/1234abcd-12ab-34cd-56ef-1234567890ab"   ARN of a KMS Key Alias: "arn:aws:kms:region:account ID:alias/ExampleAlias"   If you don't specify an encryption key, the output of the medical transcription job is encrypted with the default Amazon S3 key (SSE-S3). If you specify a KMS key to encrypt your output, you must also specify an output location in the OutputBucketName parameter.
        public let outputEncryptionKMSKeyId: String?
        /// You can specify a location in an Amazon S3 bucket to store the output of your medical transcription job. If you don't specify an output key, Amazon Transcribe Medical stores the output of your transcription job in the Amazon S3 bucket you specified. By default, the object key is "your-transcription-job-name.json". You can use output keys to specify the Amazon S3 prefix and file name of the transcription output. For example, specifying the Amazon S3 prefix, "folder1/folder2/", as an output key would lead to the output being stored as "folder1/folder2/your-transcription-job-name.json". If you specify "my-other-job-name.json" as the output key, the object key is changed to "my-other-job-name.json". You can use an output key to change both the prefix and the file name, for example "folder/my-other-job-name.json". If you specify an output key, you must also specify an S3 bucket in the OutputBucketName parameter.
        public let outputKey: String?
        /// Optional settings for the medical transcription job.
        public let settings: MedicalTranscriptionSetting?
        /// The medical specialty of any clinician speaking in the input media.
        public let specialty: Specialty
        /// The type of speech in the input audio. CONVERSATION refers to conversations between two or more speakers, e.g., a conversations between doctors and patients. DICTATION refers to single-speaker dictated speech, e.g., for clinical notes.
        public let type: `Type`

        public init(languageCode: LanguageCode, media: Media, mediaFormat: MediaFormat? = nil, mediaSampleRateHertz: Int? = nil, medicalTranscriptionJobName: String, outputBucketName: String, outputEncryptionKMSKeyId: String? = nil, outputKey: String? = nil, settings: MedicalTranscriptionSetting? = nil, specialty: Specialty, type: `Type`) {
            self.languageCode = languageCode
            self.media = media
            self.mediaFormat = mediaFormat
            self.mediaSampleRateHertz = mediaSampleRateHertz
            self.medicalTranscriptionJobName = medicalTranscriptionJobName
            self.outputBucketName = outputBucketName
            self.outputEncryptionKMSKeyId = outputEncryptionKMSKeyId
            self.outputKey = outputKey
            self.settings = settings
            self.specialty = specialty
            self.type = type
        }

        public func validate(name: String) throws {
            try self.media.validate(name: "\(name).media")
            try self.validate(self.mediaSampleRateHertz, name: "mediaSampleRateHertz", parent: name, max: 48000)
            try self.validate(self.mediaSampleRateHertz, name: "mediaSampleRateHertz", parent: name, min: 8000)
            try self.validate(self.medicalTranscriptionJobName, name: "medicalTranscriptionJobName", parent: name, max: 200)
            try self.validate(self.medicalTranscriptionJobName, name: "medicalTranscriptionJobName", parent: name, min: 1)
            try self.validate(self.medicalTranscriptionJobName, name: "medicalTranscriptionJobName", parent: name, pattern: "^[0-9a-zA-Z._-]+")
            try self.validate(self.outputBucketName, name: "outputBucketName", parent: name, max: 64)
            try self.validate(self.outputBucketName, name: "outputBucketName", parent: name, pattern: "[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]")
            try self.validate(self.outputEncryptionKMSKeyId, name: "outputEncryptionKMSKeyId", parent: name, max: 2048)
            try self.validate(self.outputEncryptionKMSKeyId, name: "outputEncryptionKMSKeyId", parent: name, min: 1)
            try self.validate(self.outputEncryptionKMSKeyId, name: "outputEncryptionKMSKeyId", parent: name, pattern: "^[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,2048}$")
            try self.validate(self.outputKey, name: "outputKey", parent: name, max: 1024)
            try self.validate(self.outputKey, name: "outputKey", parent: name, min: 1)
            try self.validate(self.outputKey, name: "outputKey", parent: name, pattern: "[a-zA-Z0-9-_.!*'()/]{1,1024}$")
            try self.settings?.validate(name: "\(name).settings")
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case media = "Media"
            case mediaFormat = "MediaFormat"
            case mediaSampleRateHertz = "MediaSampleRateHertz"
            case medicalTranscriptionJobName = "MedicalTranscriptionJobName"
            case outputBucketName = "OutputBucketName"
            case outputEncryptionKMSKeyId = "OutputEncryptionKMSKeyId"
            case outputKey = "OutputKey"
            case settings = "Settings"
            case specialty = "Specialty"
            case type = "Type"
        }
    }

    public struct StartMedicalTranscriptionJobResponse: AWSDecodableShape {
        /// A batch job submitted to transcribe medical speech to text.
        public let medicalTranscriptionJob: MedicalTranscriptionJob?

        public init(medicalTranscriptionJob: MedicalTranscriptionJob? = nil) {
            self.medicalTranscriptionJob = medicalTranscriptionJob
        }

        private enum CodingKeys: String, CodingKey {
            case medicalTranscriptionJob = "MedicalTranscriptionJob"
        }
    }

    public struct StartTranscriptionJobRequest: AWSEncodableShape {
        /// An object that contains the request parameters for content redaction.
        public let contentRedaction: ContentRedaction?
        /// Set this field to true to enable automatic language identification. Automatic language identification is disabled by default. You receive a BadRequestException error if you enter a value for a LanguageCode.
        public let identifyLanguage: Bool?
        /// Provides information about how a transcription job is executed. Use this field to indicate that the job can be queued for deferred execution if the concurrency limit is reached and there are no slots available to immediately run the job.
        public let jobExecutionSettings: JobExecutionSettings?
        /// The language code for the language used in the input media file.
        public let languageCode: LanguageCode?
        /// An object containing a list of languages that might be present in your collection of audio files. Automatic language identification chooses a language that best matches the source audio from that list.
        public let languageOptions: [LanguageCode]?
        /// An object that describes the input media for a transcription job.
        public let media: Media
        /// The format of the input media file.
        public let mediaFormat: MediaFormat?
        /// The sample rate, in Hertz, of the audio track in the input media file.  If you do not specify the media sample rate, Amazon Transcribe determines the sample rate. If you specify the sample rate, it must match the sample rate detected by Amazon Transcribe. In most cases, you should leave the MediaSampleRateHertz field blank and let Amazon Transcribe determine the sample rate.
        public let mediaSampleRateHertz: Int?
        /// Choose the custom language model you use for your transcription job in this parameter.
        public let modelSettings: ModelSettings?
        /// The location where the transcription is stored. If you set the OutputBucketName, Amazon Transcribe puts the transcript in the specified S3 bucket. When you call the GetTranscriptionJob operation, the operation returns this location in the TranscriptFileUri field. If you enable content redaction, the redacted transcript appears in RedactedTranscriptFileUri. If you enable content redaction and choose to output an unredacted transcript, that transcript's location still appears in the TranscriptFileUri. The S3 bucket must have permissions that allow Amazon Transcribe to put files in the bucket. For more information, see Permissions Required for IAM User Roles. You can specify an AWS Key Management Service (KMS) key to encrypt the output of your transcription using the OutputEncryptionKMSKeyId parameter. If you don't specify a KMS key, Amazon Transcribe uses the default Amazon S3 key for server-side encryption of transcripts that are placed in your S3 bucket. If you don't set the OutputBucketName, Amazon Transcribe generates a pre-signed URL, a shareable URL that provides secure access to your transcription, and returns it in the TranscriptFileUri field. Use this URL to download the transcription.
        public let outputBucketName: String?
        /// The Amazon Resource Name (ARN) of the AWS Key Management Service (KMS) key used to encrypt the output of the transcription job. The user calling the StartTranscriptionJob operation must have permission to use the specified KMS key. You can use either of the following to identify a KMS key in the current account:   KMS Key ID: "1234abcd-12ab-34cd-56ef-1234567890ab"   KMS Key Alias: "alias/ExampleAlias"   You can use either of the following to identify a KMS key in the current account or another account:   Amazon Resource Name (ARN) of a KMS Key: "arn:aws:kms:region:account ID:key/1234abcd-12ab-34cd-56ef-1234567890ab"   ARN of a KMS Key Alias: "arn:aws:kms:region:account ID:alias/ExampleAlias"   If you don't specify an encryption key, the output of the transcription job is encrypted with the default Amazon S3 key (SSE-S3).  If you specify a KMS key to encrypt your output, you must also specify an output location in the OutputBucketName parameter.
        public let outputEncryptionKMSKeyId: String?
        /// You can specify a location in an Amazon S3 bucket to store the output of your transcription job. If you don't specify an output key, Amazon Transcribe stores the output of your transcription job in the Amazon S3 bucket you specified. By default, the object key is "your-transcription-job-name.json". You can use output keys to specify the Amazon S3 prefix and file name of the transcription output. For example, specifying the Amazon S3 prefix, "folder1/folder2/", as an output key would lead to the output being stored as "folder1/folder2/your-transcription-job-name.json". If you specify "my-other-job-name.json" as the output key, the object key is changed to "my-other-job-name.json". You can use an output key to change both the prefix and the file name, for example "folder/my-other-job-name.json". If you specify an output key, you must also specify an S3 bucket in the OutputBucketName parameter.
        public let outputKey: String?
        /// A Settings object that provides optional settings for a transcription job.
        public let settings: Settings?
        /// The name of the job. You can't use the strings "." or ".." by themselves as the job name. The name must also be unique within an AWS account. If you try to create a transcription job with the same name as a previous transcription job, you get a ConflictException error.
        public let transcriptionJobName: String

        public init(contentRedaction: ContentRedaction? = nil, identifyLanguage: Bool? = nil, jobExecutionSettings: JobExecutionSettings? = nil, languageCode: LanguageCode? = nil, languageOptions: [LanguageCode]? = nil, media: Media, mediaFormat: MediaFormat? = nil, mediaSampleRateHertz: Int? = nil, modelSettings: ModelSettings? = nil, outputBucketName: String? = nil, outputEncryptionKMSKeyId: String? = nil, outputKey: String? = nil, settings: Settings? = nil, transcriptionJobName: String) {
            self.contentRedaction = contentRedaction
            self.identifyLanguage = identifyLanguage
            self.jobExecutionSettings = jobExecutionSettings
            self.languageCode = languageCode
            self.languageOptions = languageOptions
            self.media = media
            self.mediaFormat = mediaFormat
            self.mediaSampleRateHertz = mediaSampleRateHertz
            self.modelSettings = modelSettings
            self.outputBucketName = outputBucketName
            self.outputEncryptionKMSKeyId = outputEncryptionKMSKeyId
            self.outputKey = outputKey
            self.settings = settings
            self.transcriptionJobName = transcriptionJobName
        }

        public func validate(name: String) throws {
            try self.jobExecutionSettings?.validate(name: "\(name).jobExecutionSettings")
            try self.validate(self.languageOptions, name: "languageOptions", parent: name, min: 2)
            try self.media.validate(name: "\(name).media")
            try self.validate(self.mediaSampleRateHertz, name: "mediaSampleRateHertz", parent: name, max: 48000)
            try self.validate(self.mediaSampleRateHertz, name: "mediaSampleRateHertz", parent: name, min: 8000)
            try self.modelSettings?.validate(name: "\(name).modelSettings")
            try self.validate(self.outputBucketName, name: "outputBucketName", parent: name, max: 64)
            try self.validate(self.outputBucketName, name: "outputBucketName", parent: name, pattern: "[a-z0-9][\\.\\-a-z0-9]{1,61}[a-z0-9]")
            try self.validate(self.outputEncryptionKMSKeyId, name: "outputEncryptionKMSKeyId", parent: name, max: 2048)
            try self.validate(self.outputEncryptionKMSKeyId, name: "outputEncryptionKMSKeyId", parent: name, min: 1)
            try self.validate(self.outputEncryptionKMSKeyId, name: "outputEncryptionKMSKeyId", parent: name, pattern: "^[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,2048}$")
            try self.validate(self.outputKey, name: "outputKey", parent: name, max: 1024)
            try self.validate(self.outputKey, name: "outputKey", parent: name, min: 1)
            try self.validate(self.outputKey, name: "outputKey", parent: name, pattern: "[a-zA-Z0-9-_.!*'()/]{1,1024}$")
            try self.settings?.validate(name: "\(name).settings")
            try self.validate(self.transcriptionJobName, name: "transcriptionJobName", parent: name, max: 200)
            try self.validate(self.transcriptionJobName, name: "transcriptionJobName", parent: name, min: 1)
            try self.validate(self.transcriptionJobName, name: "transcriptionJobName", parent: name, pattern: "^[0-9a-zA-Z._-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case contentRedaction = "ContentRedaction"
            case identifyLanguage = "IdentifyLanguage"
            case jobExecutionSettings = "JobExecutionSettings"
            case languageCode = "LanguageCode"
            case languageOptions = "LanguageOptions"
            case media = "Media"
            case mediaFormat = "MediaFormat"
            case mediaSampleRateHertz = "MediaSampleRateHertz"
            case modelSettings = "ModelSettings"
            case outputBucketName = "OutputBucketName"
            case outputEncryptionKMSKeyId = "OutputEncryptionKMSKeyId"
            case outputKey = "OutputKey"
            case settings = "Settings"
            case transcriptionJobName = "TranscriptionJobName"
        }
    }

    public struct StartTranscriptionJobResponse: AWSDecodableShape {
        /// An object containing details of the asynchronous transcription job.
        public let transcriptionJob: TranscriptionJob?

        public init(transcriptionJob: TranscriptionJob? = nil) {
            self.transcriptionJob = transcriptionJob
        }

        private enum CodingKeys: String, CodingKey {
            case transcriptionJob = "TranscriptionJob"
        }
    }

    public struct Transcript: AWSDecodableShape {
        /// The S3 object location of the redacted transcript. Use this URI to access the redacted transcript. If you specified an S3 bucket in the OutputBucketName field when you created the job, this is the URI of that bucket. If you chose to store the transcript in Amazon Transcribe, this is a shareable URL that provides secure access to that location.
        public let redactedTranscriptFileUri: String?
        /// The S3 object location of the transcript. Use this URI to access the transcript. If you specified an S3 bucket in the OutputBucketName field when you created the job, this is the URI of that bucket. If you chose to store the transcript in Amazon Transcribe, this is a shareable URL that provides secure access to that location.
        public let transcriptFileUri: String?

        public init(redactedTranscriptFileUri: String? = nil, transcriptFileUri: String? = nil) {
            self.redactedTranscriptFileUri = redactedTranscriptFileUri
            self.transcriptFileUri = transcriptFileUri
        }

        private enum CodingKeys: String, CodingKey {
            case redactedTranscriptFileUri = "RedactedTranscriptFileUri"
            case transcriptFileUri = "TranscriptFileUri"
        }
    }

    public struct TranscriptionJob: AWSDecodableShape {
        /// A timestamp that shows when the job was completed.
        public let completionTime: Date?
        /// An object that describes content redaction settings for the transcription job.
        public let contentRedaction: ContentRedaction?
        /// A timestamp that shows when the job was created.
        public let creationTime: Date?
        /// If the TranscriptionJobStatus field is FAILED, this field contains information about why the job failed. The FailureReason field can contain one of the following values:    Unsupported media format - The media format specified in the MediaFormat field of the request isn't valid. See the description of the MediaFormat field for a list of valid values.    The media format provided does not match the detected media format - The media format of the audio file doesn't match the format specified in the MediaFormat field in the request. Check the media format of your media file and make sure that the two values match.    Invalid sample rate for audio file - The sample rate specified in the MediaSampleRateHertz of the request isn't valid. The sample rate must be between 8000 and 48000 Hertz.    The sample rate provided does not match the detected sample rate - The sample rate in the audio file doesn't match the sample rate specified in the MediaSampleRateHertz field in the request. Check the sample rate of your media file and make sure that the two values match.    Invalid file size: file size too large - The size of your audio file is larger than Amazon Transcribe can process. For more information, see Limits in the Amazon Transcribe Developer Guide.    Invalid number of channels: number of channels too large - Your audio contains more channels than Amazon Transcribe is configured to process. To request additional channels, see Amazon Transcribe Limits in the Amazon Web Services General Reference.
        public let failureReason: String?
        /// A value between zero and one that Amazon Transcribe assigned to the language that it identified in the source audio. Larger values indicate that Amazon Transcribe has higher confidence in the language it identified.
        public let identifiedLanguageScore: Float?
        /// A value that shows if automatic language identification was enabled for a transcription job.
        public let identifyLanguage: Bool?
        /// Provides information about how a transcription job is executed.
        public let jobExecutionSettings: JobExecutionSettings?
        /// The language code for the input speech.
        public let languageCode: LanguageCode?
        /// An object that shows the optional array of languages inputted for transcription jobs with automatic language identification enabled.
        public let languageOptions: [LanguageCode]?
        /// An object that describes the input media for the transcription job.
        public let media: Media?
        /// The format of the input media file.
        public let mediaFormat: MediaFormat?
        /// The sample rate, in Hertz, of the audio track in the input media file.
        public let mediaSampleRateHertz: Int?
        /// An object containing the details of your custom language model.
        public let modelSettings: ModelSettings?
        /// Optional settings for the transcription job. Use these settings to turn on speaker recognition, to set the maximum number of speakers that should be identified and to specify a custom vocabulary to use when processing the transcription job.
        public let settings: Settings?
        /// A timestamp that shows with the job was started processing.
        public let startTime: Date?
        /// An object that describes the output of the transcription job.
        public let transcript: Transcript?
        /// The name of the transcription job.
        public let transcriptionJobName: String?
        /// The status of the transcription job.
        public let transcriptionJobStatus: TranscriptionJobStatus?

        public init(completionTime: Date? = nil, contentRedaction: ContentRedaction? = nil, creationTime: Date? = nil, failureReason: String? = nil, identifiedLanguageScore: Float? = nil, identifyLanguage: Bool? = nil, jobExecutionSettings: JobExecutionSettings? = nil, languageCode: LanguageCode? = nil, languageOptions: [LanguageCode]? = nil, media: Media? = nil, mediaFormat: MediaFormat? = nil, mediaSampleRateHertz: Int? = nil, modelSettings: ModelSettings? = nil, settings: Settings? = nil, startTime: Date? = nil, transcript: Transcript? = nil, transcriptionJobName: String? = nil, transcriptionJobStatus: TranscriptionJobStatus? = nil) {
            self.completionTime = completionTime
            self.contentRedaction = contentRedaction
            self.creationTime = creationTime
            self.failureReason = failureReason
            self.identifiedLanguageScore = identifiedLanguageScore
            self.identifyLanguage = identifyLanguage
            self.jobExecutionSettings = jobExecutionSettings
            self.languageCode = languageCode
            self.languageOptions = languageOptions
            self.media = media
            self.mediaFormat = mediaFormat
            self.mediaSampleRateHertz = mediaSampleRateHertz
            self.modelSettings = modelSettings
            self.settings = settings
            self.startTime = startTime
            self.transcript = transcript
            self.transcriptionJobName = transcriptionJobName
            self.transcriptionJobStatus = transcriptionJobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case completionTime = "CompletionTime"
            case contentRedaction = "ContentRedaction"
            case creationTime = "CreationTime"
            case failureReason = "FailureReason"
            case identifiedLanguageScore = "IdentifiedLanguageScore"
            case identifyLanguage = "IdentifyLanguage"
            case jobExecutionSettings = "JobExecutionSettings"
            case languageCode = "LanguageCode"
            case languageOptions = "LanguageOptions"
            case media = "Media"
            case mediaFormat = "MediaFormat"
            case mediaSampleRateHertz = "MediaSampleRateHertz"
            case modelSettings = "ModelSettings"
            case settings = "Settings"
            case startTime = "StartTime"
            case transcript = "Transcript"
            case transcriptionJobName = "TranscriptionJobName"
            case transcriptionJobStatus = "TranscriptionJobStatus"
        }
    }

    public struct TranscriptionJobSummary: AWSDecodableShape {
        /// A timestamp that shows when the job was completed.
        public let completionTime: Date?
        /// The content redaction settings of the transcription job.
        public let contentRedaction: ContentRedaction?
        /// A timestamp that shows when the job was created.
        public let creationTime: Date?
        /// If the TranscriptionJobStatus field is FAILED, a description of the error.
        public let failureReason: String?
        /// A value between zero and one that Amazon Transcribe assigned to the language it identified in the source audio. A higher score indicates that Amazon Transcribe is more confident in the language it identified.
        public let identifiedLanguageScore: Float?
        /// Whether automatic language identification was enabled for a transcription job.
        public let identifyLanguage: Bool?
        /// The language code for the input speech.
        public let languageCode: LanguageCode?
        public let modelSettings: ModelSettings?
        /// Indicates the location of the output of the transcription job. If the value is CUSTOMER_BUCKET then the location is the S3 bucket specified in the outputBucketName field when the transcription job was started with the StartTranscriptionJob operation. If the value is SERVICE_BUCKET then the output is stored by Amazon Transcribe and can be retrieved using the URI in the GetTranscriptionJob response's TranscriptFileUri field.
        public let outputLocationType: OutputLocationType?
        /// A timestamp that shows when the job started processing.
        public let startTime: Date?
        /// The name of the transcription job.
        public let transcriptionJobName: String?
        /// The status of the transcription job. When the status is COMPLETED, use the GetTranscriptionJob operation to get the results of the transcription.
        public let transcriptionJobStatus: TranscriptionJobStatus?

        public init(completionTime: Date? = nil, contentRedaction: ContentRedaction? = nil, creationTime: Date? = nil, failureReason: String? = nil, identifiedLanguageScore: Float? = nil, identifyLanguage: Bool? = nil, languageCode: LanguageCode? = nil, modelSettings: ModelSettings? = nil, outputLocationType: OutputLocationType? = nil, startTime: Date? = nil, transcriptionJobName: String? = nil, transcriptionJobStatus: TranscriptionJobStatus? = nil) {
            self.completionTime = completionTime
            self.contentRedaction = contentRedaction
            self.creationTime = creationTime
            self.failureReason = failureReason
            self.identifiedLanguageScore = identifiedLanguageScore
            self.identifyLanguage = identifyLanguage
            self.languageCode = languageCode
            self.modelSettings = modelSettings
            self.outputLocationType = outputLocationType
            self.startTime = startTime
            self.transcriptionJobName = transcriptionJobName
            self.transcriptionJobStatus = transcriptionJobStatus
        }

        private enum CodingKeys: String, CodingKey {
            case completionTime = "CompletionTime"
            case contentRedaction = "ContentRedaction"
            case creationTime = "CreationTime"
            case failureReason = "FailureReason"
            case identifiedLanguageScore = "IdentifiedLanguageScore"
            case identifyLanguage = "IdentifyLanguage"
            case languageCode = "LanguageCode"
            case modelSettings = "ModelSettings"
            case outputLocationType = "OutputLocationType"
            case startTime = "StartTime"
            case transcriptionJobName = "TranscriptionJobName"
            case transcriptionJobStatus = "TranscriptionJobStatus"
        }
    }

    public struct UpdateMedicalVocabularyRequest: AWSEncodableShape {
        /// The language code of the language used for the entries in the updated vocabulary. US English (en-US) is the only valid language code in Amazon Transcribe Medical.
        public let languageCode: LanguageCode
        /// The location in Amazon S3 of the text file that contains the you use for your custom vocabulary. The URI must be in the same AWS Region as the resource that you are calling. The following is the format for a URI:   https://s3.&lt;aws-region&gt;.amazonaws.com/&lt;bucket-name&gt;/&lt;keyprefix&gt;/&lt;objectkey&gt;   For example:  https://s3.us-east-1.amazonaws.com/AWSDOC-EXAMPLE-BUCKET/vocab.txt  For more information about Amazon S3 object names, see Object Keys in the Amazon S3 Developer Guide. For more information about custom vocabularies in Amazon Transcribe Medical, see Medical Custom Vocabularies.
        public let vocabularyFileUri: String?
        /// The name of the vocabulary to update. The name is case sensitive. If you try to update a vocabulary with the same name as a vocabulary you've already made, you get a ConflictException error.
        public let vocabularyName: String

        public init(languageCode: LanguageCode, vocabularyFileUri: String? = nil, vocabularyName: String) {
            self.languageCode = languageCode
            self.vocabularyFileUri = vocabularyFileUri
            self.vocabularyName = vocabularyName
        }

        public func validate(name: String) throws {
            try self.validate(self.vocabularyFileUri, name: "vocabularyFileUri", parent: name, max: 2000)
            try self.validate(self.vocabularyFileUri, name: "vocabularyFileUri", parent: name, min: 1)
            try self.validate(self.vocabularyFileUri, name: "vocabularyFileUri", parent: name, pattern: "(s3://|http(s*)://).+")
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, max: 200)
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, min: 1)
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, pattern: "^[0-9a-zA-Z._-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case vocabularyFileUri = "VocabularyFileUri"
            case vocabularyName = "VocabularyName"
        }
    }

    public struct UpdateMedicalVocabularyResponse: AWSDecodableShape {
        /// The language code for the language of the text file used to update the custom vocabulary. US English (en-US) is the only language supported in Amazon Transcribe Medical.
        public let languageCode: LanguageCode?
        /// The date and time that the vocabulary was updated.
        public let lastModifiedTime: Date?
        /// The name of the updated vocabulary.
        public let vocabularyName: String?
        /// The processing state of the update to the vocabulary. When the VocabularyState field is READY, the vocabulary is ready to be used in a StartMedicalTranscriptionJob request.
        public let vocabularyState: VocabularyState?

        public init(languageCode: LanguageCode? = nil, lastModifiedTime: Date? = nil, vocabularyName: String? = nil, vocabularyState: VocabularyState? = nil) {
            self.languageCode = languageCode
            self.lastModifiedTime = lastModifiedTime
            self.vocabularyName = vocabularyName
            self.vocabularyState = vocabularyState
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case lastModifiedTime = "LastModifiedTime"
            case vocabularyName = "VocabularyName"
            case vocabularyState = "VocabularyState"
        }
    }

    public struct UpdateVocabularyFilterRequest: AWSEncodableShape {
        /// The Amazon S3 location of a text file used as input to create the vocabulary filter. Only use characters from the character set defined for custom vocabularies. For a list of character sets, see Character Sets for Custom Vocabularies. The specified file must be less than 50 KB of UTF-8 characters. If you provide the location of a list of words in the VocabularyFilterFileUri parameter, you can't use the Words parameter.
        public let vocabularyFilterFileUri: String?
        /// The name of the vocabulary filter to update. If you try to update a vocabulary filter with the same name as another vocabulary filter, you get a ConflictException error.
        public let vocabularyFilterName: String
        /// The words to use in the vocabulary filter. Only use characters from the character set defined for custom vocabularies. For a list of character sets, see Character Sets for Custom Vocabularies. If you provide a list of words in the Words parameter, you can't use the VocabularyFilterFileUri parameter.
        public let words: [String]?

        public init(vocabularyFilterFileUri: String? = nil, vocabularyFilterName: String, words: [String]? = nil) {
            self.vocabularyFilterFileUri = vocabularyFilterFileUri
            self.vocabularyFilterName = vocabularyFilterName
            self.words = words
        }

        public func validate(name: String) throws {
            try self.validate(self.vocabularyFilterFileUri, name: "vocabularyFilterFileUri", parent: name, max: 2000)
            try self.validate(self.vocabularyFilterFileUri, name: "vocabularyFilterFileUri", parent: name, min: 1)
            try self.validate(self.vocabularyFilterFileUri, name: "vocabularyFilterFileUri", parent: name, pattern: "(s3://|http(s*)://).+")
            try self.validate(self.vocabularyFilterName, name: "vocabularyFilterName", parent: name, max: 200)
            try self.validate(self.vocabularyFilterName, name: "vocabularyFilterName", parent: name, min: 1)
            try self.validate(self.vocabularyFilterName, name: "vocabularyFilterName", parent: name, pattern: "^[0-9a-zA-Z._-]+")
            try self.words?.forEach {
                try validate($0, name: "words[]", parent: name, max: 256)
                try validate($0, name: "words[]", parent: name, min: 1)
            }
            try self.validate(self.words, name: "words", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case vocabularyFilterFileUri = "VocabularyFilterFileUri"
            case vocabularyFilterName = "VocabularyFilterName"
            case words = "Words"
        }
    }

    public struct UpdateVocabularyFilterResponse: AWSDecodableShape {
        /// The language code of the words in the vocabulary filter.
        public let languageCode: LanguageCode?
        /// The date and time that the vocabulary filter was updated.
        public let lastModifiedTime: Date?
        /// The name of the updated vocabulary filter.
        public let vocabularyFilterName: String?

        public init(languageCode: LanguageCode? = nil, lastModifiedTime: Date? = nil, vocabularyFilterName: String? = nil) {
            self.languageCode = languageCode
            self.lastModifiedTime = lastModifiedTime
            self.vocabularyFilterName = vocabularyFilterName
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case lastModifiedTime = "LastModifiedTime"
            case vocabularyFilterName = "VocabularyFilterName"
        }
    }

    public struct UpdateVocabularyRequest: AWSEncodableShape {
        /// The language code of the vocabulary entries.
        public let languageCode: LanguageCode
        /// An array of strings containing the vocabulary entries.
        public let phrases: [String]?
        /// The S3 location of the text file that contains the definition of the custom vocabulary. The URI must be in the same region as the API endpoint that you are calling. The general form is  For example: For more information about S3 object names, see Object Keys in the Amazon S3 Developer Guide. For more information about custom vocabularies, see Custom Vocabularies.
        public let vocabularyFileUri: String?
        /// The name of the vocabulary to update. The name is case sensitive. If you try to update a vocabulary with the same name as a previous vocabulary you will receive a ConflictException error.
        public let vocabularyName: String

        public init(languageCode: LanguageCode, phrases: [String]? = nil, vocabularyFileUri: String? = nil, vocabularyName: String) {
            self.languageCode = languageCode
            self.phrases = phrases
            self.vocabularyFileUri = vocabularyFileUri
            self.vocabularyName = vocabularyName
        }

        public func validate(name: String) throws {
            try self.phrases?.forEach {
                try validate($0, name: "phrases[]", parent: name, max: 256)
                try validate($0, name: "phrases[]", parent: name, min: 0)
                try validate($0, name: "phrases[]", parent: name, pattern: ".+")
            }
            try self.validate(self.vocabularyFileUri, name: "vocabularyFileUri", parent: name, max: 2000)
            try self.validate(self.vocabularyFileUri, name: "vocabularyFileUri", parent: name, min: 1)
            try self.validate(self.vocabularyFileUri, name: "vocabularyFileUri", parent: name, pattern: "(s3://|http(s*)://).+")
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, max: 200)
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, min: 1)
            try self.validate(self.vocabularyName, name: "vocabularyName", parent: name, pattern: "^[0-9a-zA-Z._-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case phrases = "Phrases"
            case vocabularyFileUri = "VocabularyFileUri"
            case vocabularyName = "VocabularyName"
        }
    }

    public struct UpdateVocabularyResponse: AWSDecodableShape {
        /// The language code of the vocabulary entries.
        public let languageCode: LanguageCode?
        /// The date and time that the vocabulary was updated.
        public let lastModifiedTime: Date?
        /// The name of the vocabulary that was updated.
        public let vocabularyName: String?
        /// The processing state of the vocabulary. When the VocabularyState field contains READY the vocabulary is ready to be used in a StartTranscriptionJob request.
        public let vocabularyState: VocabularyState?

        public init(languageCode: LanguageCode? = nil, lastModifiedTime: Date? = nil, vocabularyName: String? = nil, vocabularyState: VocabularyState? = nil) {
            self.languageCode = languageCode
            self.lastModifiedTime = lastModifiedTime
            self.vocabularyName = vocabularyName
            self.vocabularyState = vocabularyState
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case lastModifiedTime = "LastModifiedTime"
            case vocabularyName = "VocabularyName"
            case vocabularyState = "VocabularyState"
        }
    }

    public struct VocabularyFilterInfo: AWSDecodableShape {
        /// The language code of the words in the vocabulary filter.
        public let languageCode: LanguageCode?
        /// The date and time that the vocabulary was last updated.
        public let lastModifiedTime: Date?
        /// The name of the vocabulary filter. The name must be unique in the account that holds the filter.
        public let vocabularyFilterName: String?

        public init(languageCode: LanguageCode? = nil, lastModifiedTime: Date? = nil, vocabularyFilterName: String? = nil) {
            self.languageCode = languageCode
            self.lastModifiedTime = lastModifiedTime
            self.vocabularyFilterName = vocabularyFilterName
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case lastModifiedTime = "LastModifiedTime"
            case vocabularyFilterName = "VocabularyFilterName"
        }
    }

    public struct VocabularyInfo: AWSDecodableShape {
        /// The language code of the vocabulary entries.
        public let languageCode: LanguageCode?
        /// The date and time that the vocabulary was last modified.
        public let lastModifiedTime: Date?
        /// The name of the vocabulary.
        public let vocabularyName: String?
        /// The processing state of the vocabulary. If the state is READY you can use the vocabulary in a StartTranscriptionJob request.
        public let vocabularyState: VocabularyState?

        public init(languageCode: LanguageCode? = nil, lastModifiedTime: Date? = nil, vocabularyName: String? = nil, vocabularyState: VocabularyState? = nil) {
            self.languageCode = languageCode
            self.lastModifiedTime = lastModifiedTime
            self.vocabularyName = vocabularyName
            self.vocabularyState = vocabularyState
        }

        private enum CodingKeys: String, CodingKey {
            case languageCode = "LanguageCode"
            case lastModifiedTime = "LastModifiedTime"
            case vocabularyName = "VocabularyName"
            case vocabularyState = "VocabularyState"
        }
    }
}
